package com.dfbz.demo01;

import java.util.Random;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo03_Random小练习_02_点名程序 {
    public static void main(String[] args) {

        String[] NationHero ={
                "精忠报国：岳飞",
                "抗击匈奴：霍去病",
                "收复新疆：左宗棠"
        };

        Random random = new Random();

        for (int i = 0; i < 100000; i++) {
            int index = random.nextInt(NationHero.length);

            System.out.println("您抽到的是: "+NationHero[index]);
        }



    }
}
